"use client";
import { Card } from "antd";
// import Title from "antd/es/typography/Title";
import Title from "antd/es/typography/Title";
import MdViewer from "../MdViewer";
import TagList from "../TagList";
import "./index.css";

interface Props {
  question: API.QuestionVO;
}
/**
 * 题目卡片组件
 * @param 题目卡片组件
 * @returns
 */
const QuestionCard: React.FC<Props> = (props) => {
  const { question } = props;
  return (
    <div className="questionCard">
      <Card>
        <Title level={1} style={{ fontSize: 24 }}>
          {question.title}
        </Title>
        <TagList tagList={question.tagList}></TagList>
        <div style={{ marginBottom: 16 }}></div>
        <MdViewer value={question.content} />
      </Card>
      <div style={{ marginBottom: 16 }}></div>
      <Card title="推荐答案">
        <MdViewer value={question.answer} />
      </Card>
    </div>
  );
};
export default QuestionCard;
